export class TemplateCriteriaModel {
    public answerCategories: AnswerCategoriesModel[];
    public criteriaEntityField: string;
    public criteriaLevel2: string;
    public criteriaType: number;
    public id: string;
    public isScreenable: boolean;
    public name: string;
    public criteriaData: any; //dynamic data    
    public isOn?: boolean;
    public isDataPoint?: boolean
    public type?: number //used for saving criteriaType1, becasue the backend treats it different from other criteria types
    
    protected setProperties(model: TemplateCriteriaModel): void {
        this.answerCategories = model.answerCategories;
        this.criteriaEntityField = model.criteriaEntityField;
        this.criteriaLevel2 = model.criteriaLevel2;
        this.criteriaType = model.criteriaType
        this.id = model.id;
        this.isScreenable = model.isScreenable;
        this.name = model.name
    }
}

class AnswerCategoriesModel {
    public code: string;
    public score: number;
    public text: string;
}